package datastructures;

/**
 * Simple Datastructure for storing two integer Coordinates as a Point
 * 
 * @since 0.1.0
 * @version 0.4.0
 * @author Tim
 * @deprecated Use {@link Vector2f instead}
 *
 */
public class Point {
	
	/**
	 * X-Coordinate
	 */
	public int x;
	
	/**
	 * Y-Coordinate
	 */
	public int y;
	
	/**
	 * 
	 * @param x X-Coordinate
	 * @param y Y-Coordinate
	 */
	public Point(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	/**
	 * Checks if this Point is equal to the Point obj
	 * @exception Throws Exception if obj can not be casted to Point
	 */
	@Override
	public synchronized boolean equals(Object obj) {
		return (this.x == ((Point)obj).x && this.y == ((Point)obj).y);
	}

	/**
	 * @return returns a String, which represents the Point: (x|y)
	 */
	@Override
	public String toString()
	{
		return "("+x+"|"+y+")";
		
	}
	
}
